﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RpcClient.Interface;
using RpcHelper;

namespace RpcExtend.Service.Config
{
    internal class SysConfig
    {
        static SysConfig()
        {
            RpcClient.RpcClient.Config.AddRefreshEvent(_InitConfig);
        }
        private static void _InitConfig(IConfigServer config, string name)
        {
            if (name == string.Empty || name.StartsWith("error"))
            {
                ErrorConfig = config.GetConfigVal("error", new ErrorEmailConfig());
            }
        }

        public static ErrorEmailConfig ErrorConfig
        {
            get;
            private set;
        }
    }
}
